<?php

namespace plugin\onecard\app\controller;

use plugin\admin\app\model\TejianAdminNotice;
use plugin\admin\app\model\TejianBanner;
use plugin\onecard\app\controller\Base;
use support\Request;

class IndexController extends Base
{

    protected $model = null;

    /**
     * 构造函数
     * @return void
     */
    public function __construct()
    {
        $this->model = new TejianBanner();
    }
    //获取广告轮播图
    public function getBanner(Request $request)
    {
        $list = $this->model->getbanner();
        return $this->json(0, 'ok', $list);
    }
    //获取滚动公告
    public function getNotice(Request $request)
    {
        $noticemodel = new TejianAdminNotice();
        $list = $noticemodel->getnotice();
        return $this->json(0, 'ok', $list);
    }

}
